-- GENERATED SPELL FOR [Death Knight Understudy] --


function spell0_16803(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(61696,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16803', 0, 1)
end

function spell1_16803(pUnit, Event) --@Bone Barrier,Self--
pUnit:FullCastSpellOnTarget(29061,pUnit)
pUnit:RegisterEvent('Sorts_16803', 20000, 1)
end

function spell2_16803(pUnit, Event) --@Taunt,n/a--
pUnit:FullCastSpellOnTarget(29060,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16803', 20000, 1)
end

function Sorts_16803(pUnit, Event)
local choix_sorts_16803 = math.random(0, 2)
if choix_sorts_16803 == 0 then
pUnit:RegisterEvent('spell0_16803', 1, 1)
end
if choix_sorts_16803 == 1 then
pUnit:RegisterEvent('spell1_16803', 1, 1)
end
if choix_sorts_16803 == 2 then
pUnit:RegisterEvent('spell2_16803', 1, 1)
end
end

function mob16803_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16803', math.random(1500, 3000), 1)
end

function mob16803_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16803_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16803_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16803, 1, 'mob16803_Action')
RegisterUnitEvent(16803, 2, 'mob16803_Leave')
RegisterUnitEvent(16803, 3, 'mob16803_Kill')
RegisterUnitEvent(16803, 4, 'mob16803_Die')
